package org.youyun56.gpsserver.db;

import java.sql.SQLException;

import org.youyun56.gpsserver.entity.User;

import com.j3.sql.GridUtils;

public class UserDao {
	
	public final static String findUser = "select * from users where username = %s";
	
	public User findUserByName(String userName) throws SQLException{
		GridUtils grid = new GridUtils();
		grid.init(String.format(findUser, userName));
		if(grid.next()){
			User user = new User();
			user.setUserName(grid.get("userName"));
			user.setPwd(grid.get("pwd"));
			user.setPwd(grid.get("pwd"));
			user.setPwd(grid.get("pwd"));
			user.setPwd(grid.get("pwd"));
			user.setPwd(grid.get("pwd"));
		}
		return null;
	}

}
